<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<style type="text/css">
	.hasDatepick { width:150px }
</style>

<x:parse xml="${param.xmlstr}" var="xmlData" />

<div class="t_bar">上一年度经营状况（单位：万元）</div>
<c:set var="lastYear" value="${statYear-1}" />

<x:forEach var="eco" select="$xmlData/data/organization/finances/finance">
			<c:set var="year">   
				<x:out select="$eco/@year" />
			</c:set>
			<c:choose>
				<c:when test="${year==statYear-1}">
		<table class="t_css" width="100%" border="0" cellpadding="0" id="attentInfo" cellspacing="1">
				
			<tr>
				<td align="right" width="130px" >总收入：</td>
				<td width="160px">		
					<input type="hidden" name="organization/finances/finance[00]@year" value="${statYear-1}" />
					<input type="hidden" name="organization/finances/finance[00]@sequence_no" value='2' />
					<span name="organization/finances/finance[00]/income">
						<x:out select="$eco/income" />
					</span>
				</td>
				<td align="right" width="130px">纳税总额：</td>
				<td width="160px">
					<span name="organization/finances/finance[00]/fax">
						<x:out select="$eco/fax"/>
					</span>
				</td>
				<td align="right" width="130px">产品销售总额：</td>
				<td>		
					 <input name="proposal/pro_relief_fax_income_sale" label="上一年度经营状况->产品销售总额" class="input_css required" onfocus="InitInput.setNumber(this,7,4,2,this.id,true)"  
							style="text-align:right;"  value="<x:out select="$xmlData/data/proposal/pro_relief_fax_income_sale" />"/>&nbsp;
				</td>
			</tr>
			<tr  class="li_2">	
				<td align="right">创汇总额：</td>
				<td >		
					<span name="organization/finances/finance[00]/export">
						<x:out select="$eco/export"/>
					</span>万美元
				</td>
				<td align="right" >净利润：</td>
				<td>		
					<span name="organization/finances/finance[00]/proft">
						<x:out select="$eco/proft"/>
					</span>
				</td>
					<td align="right"><span class="color_red">*</span>技术开发经费支出额：</td>
					<td>
					<input name="proposal/pro_relief_fax_income_yanfa" label="上一年度经营状况->技术开发经费支出额" class="input_css required" onfocus="InitInput.setNumber(this,7,4,2,this.id,true)" 
							style="text-align:right;"  value="<x:out select="$xmlData/data/proposal/pro_relief_fax_income_yanfa" />"/>&nbsp;
		   			 </td>	
			</tr>
			<tr>
				<td align="right">总资产：</td>
				<td>		
					<span name="organization/finances/finance[00]/assets">
						<x:out select="$eco/assets"/>
					</span>
				</td>
				<td align="right">固定资产总额：</td>
				<td colspan="3">		
					<span name="organization/finances/finance[00]/assets_fixed">
						<x:out select="$eco/assets_fixed"/>
					</span>
				</td>
			</tr>
		</table>
	</c:when>
	</c:choose>
</x:forEach>

		<br>
	
	<div class="t_bar"><span class="color_red">*</span>本年度经营状况（单位：万元）</div>
<c:set var="lastYear" value="${statYear-1}" />
<x:set var="finance" select="$xmlData/data/finances/finance"/> 
<c:set value="0" var="index" scope="page"/>
		<table class="t_css" width="100%" border="0" cellpadding="0" id="bnfinances2" cellspacing="1">
				
			<tr>
				<td align="right" width="130px" >总收入：</td>
				<td width="160px">		
					<input
						name="organization/bnfinances/income" label="本年度经营状况->总收入"
						class="input_text required" style="width:80px;text-align:right"
						onfocus="InitInput.setNumber(this,7,4,2,this.id,true)"
						value="<x:out select='$xmlData/data/organization/bnfinances/income' />" />
				</td>
				<td align="right" width="130px">纳税总额：</td>
				<td width="160px">
					<input
						name="organization/bnfinances/fax" label="本年度经营状况->纳税总额"
						class="input_text required" style="width:80px;text-align:right"
						onfocus="InitInput.setNumber(this,7,4,2,this.id,true)"
						value="<x:out select='$xmlData/data/organization/bnfinances/fax' />" />
				</td>
				<td align="right" width="130px">产品销售总额：</td>
				<td>		
					<input
						name="organization/bnfinances/income_sale" label="本年度经营状况->产品销售总额"
						class="input_text required" style="width:80px;text-align:right"
						onfocus="InitInput.setNumber(this,7,4,2,this.id,true)"
						value="<x:out select='$xmlData/data/organization/bnfinances/income_sale' />" />
				</td>
			</tr>
			<tr  class="li_2">	
				<td align="right">创汇总额：</td>
				<td >		
					<input
						name="organization/bnfinances/export" label="本年度经营状况->创汇总额"
						class="input_text required" style="width:80px;text-align:right"
						onfocus="InitInput.setNumber(this,7,4,2,this.id,true)"
						value="<x:out select='$xmlData/data/organization/bnfinances/export' />" />万美元
				</td>
				<td align="right" >净利润：</td>
				<td>		
					<input
						name="organization/bnfinances/proft" label="本年度经营状况->净利润"
						class="input_text required" style="width:80px;text-align:right"
						onfocus="InitInput.setNumber(this,7,4,2,this.id,true)"
						value="<x:out select='$xmlData/data/organization/bnfinances/proft' />" />
				</td>	
				<td align="right">技术开发经费支出额：</td>
				<td  >		
					<input
						name="organization/bnfinances/relief_fax_income_yanfa" label="本年度经营状况->技术开发经费支出额"
						class="input_text required" style="width:80px;text-align:right"
						onfocus="InitInput.setNumber(this,7,4,2,this.id,true)"
						value="<x:out select='$xmlData/data/organization/bnfinances/relief_fax_income_yanfa' />" />
				</td>
			</tr>
			<tr>
				<td align="right">总资产：</td>
				<td>		
					<input
						name="organization/bnfinances/assets" label="本年度经营状况->总资产"
						class="input_text required" style="width:80px;text-align:right"
						onfocus="InitInput.setNumber(this,7,4,2,this.id,true)"
						value="<x:out select='$xmlData/data/organization/bnfinances/assets' />" />
				</td>
				<td align="right">固定资产总额：</td>
				<td colspan="3">		
					<input
						name="organization/bnfinances/assets_fixed" label="本年度经营状况->固定资产总额"
						class="input_text required" style="width:80px;text-align:right"
						onfocus="InitInput.setNumber(this,7,4,2,this.id,true)"
						value="<x:out select='$xmlData/data/organization/bnfinances/assets_fixed' />" />
				</td>
			</tr>
</table>

<br/>
<div class="t_bar">
	<span class="color_red">*</span>节能减排开展情况（限800字）
</div>

<table class="t_css"  border="0" cellspacing="1" cellpadding="0" width="100%" id="energySavings">
	
	<tr>
		<td>
			<textarea  name="organization/energy_saving" rows="5" style="width:900px" class="input_textarea required maxlength:800 textarea"  label="节能减排开展情况" ><x:out select="$xmlData/data/organization/energy_saving" escapeXml="true" /></textarea>
		<input name="organization/energy_saving_hidden" value="" type="hidden"/>
		</td>
	</tr>
</table>
<br>
<div class="t_bar"><span class="color_red">*</span>主要产品情况</div>
<table  id="tblInstrumentList" cellpadding="0" class="table01" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid; text-align: center">
			<thead >
					<tr style="border:1px solid #B7D1E6">
						<th class="TblHead" align="center"  width="5%">选择</th>
						<th class="TblHead" align="center"  width="5%">序号</th>
						<th class="TblHead" align="center"  width="57%">主要产品名称</th>
						<th class="TblHead" align="center"  width="15%">是否具有知识产权</th>
						<th class="TblHead" align="center"  width="18%">占企业销售收入总额比例</th> 
					</tr>
			</thead>
			<tbody id="tab">
					<tr style="display:none">
						<td align="center">&nbsp;
						 	<input type="radio" class="radiobutton" name="selInstrumentList">
						</td>
						<td align="center">&nbsp;
							<span name="organization|products_list|product[0]@seq_no" >[index]</span> 
						</td>
						<td align="center">
							<input type="text" name="organization|products_list|product[0]|name" label="主要产品名称" style="width:90%" class="required input_text maxlength:50" />
						</td>
						<td align="center">
							<select class="select_width" name="rights" onchange="changeProductSelect(this.id);" id="rights_[index]">
								<option></option>
								<option value="01">是</option>
								<option value="02">否</option>
							</select>
							<input type="hidden" name="organization|products_list|product[0]|rights_value" value="" class="required" label="是否具有知识产权" />
							<input type="hidden" name="organization|products_list|product[0]|rights_name" value=""/>
						</td> 
						<td align="center">
							<input type="text" name="organization|products_list|product[0]|income_rate" 
							label="占企业销售收入总额比例" style="text-align:right;width:100px;" onfocus="InitInput.setNumber(this,7,4,2)"
							class="required input_text" maxlength="50"/> %
						</td> 
						
					</tr>
					
					<c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/organization/products_list/product" var="product">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr >
						<td align="center">&nbsp;
							<input type="radio" class="radiobutton" name="selMileStones" >
						</td>
						<td align="center">&nbsp;
							<span name="organization/products_list/product[${flag}${index}]@seq_no" ><x:out select="$product/@seq_no"/></span> 
						</td>
						<td>
							<input type="text" name="organization/products_list/product[${flag}${index}]/name" label="主要产品名称" style="width:90%;" required  class="required input_text maxlength:50" value="<x:out select="$product/name" />" maxlength="50"/>
						</td>
						
						
						<td >
							<select class="select_width" name="rights">
								<option></option>
								<option value="01" label="是">是</option>
								<option value="02" label="否">否</option>
							</select>
							<input type="hidden" name="organization/products_list/product[${flag}${index}]/rights_name"  value="<x:out select="$product/rights_name" />"/>
							<input type="hidden" name="organization/products_list/product[${flag}${index}]/rights_value" label="是否具有知识产权" class="required " value="<x:out select="$product/rights_value" />"/>
								
						</td> 
						
						
						<td >
							<input type="text" name="organization/products_list/product[${flag}${index}]/income_rate" label="占企业销售收入总额比例" style="text-align:right;width:100px;" onfocus="InitInput.setNumber(this,7,4,2)"
							required class="required input_text maxlength:50" value="<x:out select="$product/income_rate" />" maxlength="50"/> %
						</td> 
						
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
					
				</tbody>
					</table>
					<br>

					<table width="98%" align="center">
					<tr ><td>
					<input class="button" name="cmdAddbefore" type=button value="添加" 
						onclick="if(checkTabLimit('tblInstrumentList',10,'主要产品情况最多只能填写10条')){addNewRow('tblInstrumentList');showDateTag('tblInstrumentList');}try{top.resizeFrame();}catch(e){};">
					<input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev('tblInstrumentList','selInstrumentList')">
					<input class="button" name="cmdMoveNext" type=button value="下移" onclick="moveNext('tblInstrumentList','selInstrumentList')">
					<input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tblInstrumentList','主要产品情况')">
					</td></tr>
					
					
					
	</table>
<script type="text/javascript">
function changeProductSelect(id){

	var obj=$("#" + id);
	var name=obj.attr("name");
	
	var valueObj = obj.parents("tr").find("input[name$='"+name+"_value']");
	var nameObj = obj.parents("tr").find("input[name$='"+name+"_name']");

	valueObj.val(obj.val());
	nameObj.val(obj.find("option:selected").text());
	
}

</script>